package com.cfuture08.util;

import java.io.File;

import org.apache.log4j.Logger;
import org.apache.log4j.PropertyConfigurator;


public class LogUtil {
	private static Logger logger = null;

	private LogUtil() {
	}

	public static Logger getLogger() {
		synchronized (LogUtil.class) {
			if (logger == null) {
				logger = Logger.getLogger(LogUtil.class.getName());
				String rootDir = StringUtil.uriDecoding(FileUtil
						.getRootDir(LogUtil.class));
				PropertyConfigurator.configure(rootDir + File.separator
						+ "log4j.properties");
			}

			return logger;
		}
	}
}
